<template>
	<view class="choose_stores">
		<view class="sc_top">
			<tm-search @confirm='tomap'>
					<template #right>
						地图
					</template>
			</tm-search>
		</view>
		<view class="sc_content">
			<view class="sc_navbar">
				<tm-sliderNav :list="list"  bg-color='#f4f4f4'></tm-sliderNav>
			</view>
			<view class="sc_right">
				<StoresContent v-for="(item,index) in data" :key="item.id" :item='item' ></StoresContent>
			</view>
		</view>
	</view>
</template>

<script>
	import StoresContent from "../../compoments/StoresContent.vue"
	export default {
		components:{
			StoresContent
		},
		onLoad() {
			this.searchstores()
		},
		data() {
			return {
				list:[
					{title:'热门景点'},
					{title:'常用门店'},
					{title:'机场/火车站'},
					{title:'肇庆'},
					{title:'临安'},
				],
				data:''
			}
		},
		methods: {
			async searchstores(){
				const Rres = await this.$wxRequest({
					url:'/wx/stores_search',
					method:'POST',
				})
			if(Rres.data.code == 200){
				this.data = Rres.data.data
			}
			},
			tomap(){
				uni.navigateTo({
					url:'/pages/mapplace/mapplace'
				})
			},

		}
	}
</script>

<style lang="scss" scoped> 
.choose_stores{
	width: 100%;
	height: 100%;
}
.sc_content{
	display: flex;
	justify-content: space-between;
	.sc_navbar{
		height: 95vh;
	}
	.sc_right{
		width: 80%;
	}
}

</style>
